import { ApiProperty } from '@nestjs/swagger';

class User {
  @ApiProperty({ description: 'id', required: false })
  id: number;

  @ApiProperty({ description: '用户名', required: false })
  username: string;

  @ApiProperty({ description: '昵称', required: false })
  nickName: string;

  @ApiProperty({ description: '邮箱', required: false })
  email: string;

  @ApiProperty({ description: '头像', required: false })
  headPic: string;

  @ApiProperty({ description: '手机号', required: false })
  phoneNumber: string;

  @ApiProperty({ description: '是否冻结', required: false })
  isFrozen: boolean;

  @ApiProperty({ description: '是否管理员', required: false })
  isAdmin: boolean;

  @ApiProperty({ description: '创建时间', required: false })
  createTime: number;

  @ApiProperty({ description: '更新时间', required: false })
  updateTime: Date;
}

class Room {
  @ApiProperty({ description: '会议室ID', required: false })
  id: number;

  @ApiProperty({ description: '会议室名字', required: false })
  name: string;

  @ApiProperty({ description: '会议室容量', required: false })
  capacity: number;

  @ApiProperty({ description: '会议室位置', required: false })
  location: string;

  @ApiProperty({ description: '设备', required: false })
  equipment: string;

  @ApiProperty({ description: '描述', required: false })
  description: string;

  @ApiProperty({ description: '是否被预订', required: false })
  isBooked: boolean;

  @ApiProperty({ description: '创建时间', required: false })
  createTime: Date;

  @ApiProperty({ description: '更新时间', required: false })
  updateTime: Date;
}

class Booking {
  @ApiProperty({ description: '预约ID', required: false })
  id: number;

  @ApiProperty({ description: '开始时间', required: false })
  startTime: Date;

  @ApiProperty({ description: '结束时间', required: false })
  endTime: Date;

  @ApiProperty({ description: '状态', required: false })
  status: string;

  @ApiProperty({ description: '备注', required: false })
  note: string;

  @ApiProperty({ description: '创建时间', required: false })
  createTime: Date;

  @ApiProperty({ description: '更新时间', required: false })
  updateTime: Date;

  @ApiProperty({ description: '用户', required: false })
  user: User;

  @ApiProperty({ description: '会议室', required: false })
  room: Room;
}

export class BookingListVo {
  @ApiProperty({ description: '列表', required: false, type: [Booking] })
  bookings: [Booking];
}
